package com.blackitheima3.LambdaDemo;

public class TestDouble {
    public static void main(String[] args) {
        //匿名内部类
        getSum(new GoDoubleSum() {
            @Override
            public double getDSum(double x, double y) {
                return x+y;
            }
        });
        //Lambda 表达式
        getSum((x,y)->x+y);

    }
    public static void getSum(GoDoubleSum goDoubleSum){
        double d=goDoubleSum.getDSum(3.14,3.25);
        System.out.println(d);
    }
}
//接口
interface GoDoubleSum{
    public abstract double getDSum(double x,double y);
}
